package com.mall.common;

import javax.servlet.http.HttpSession;
import javax.servlet.http.HttpSessionEvent;
import javax.servlet.http.HttpSessionListener;

/**
 * Created by xiaoyao on 2017/9/12.
 */
    public class MySessionListener implements HttpSessionListener {
        public void sessionCreated(HttpSessionEvent httpSessionEvent) {
            MySessionContext.AddSession(httpSessionEvent.getSession());
        }
        public void sessionDestroyed(HttpSessionEvent httpSessionEvent) {
            HttpSession session = httpSessionEvent.getSession();
            MySessionContext.DelSession(session);
        }
}
